<script setup>
import {ref,onMounted,onBeforeUnmount,defineProps} from "vue"
import axios from "axios"
import animeModel1 from "../../components/animeModel1.vue"
import animeModel2 from "../../components/animeModel2.vue"

import { useRoute } from "vue-router"

const JBTXVideoUrl = ref("")
const JBTXFanName = ref("")
const JBTXFanImage = ref("")
const fan1Url = ref("")
const fan2Url = ref("")

const route = useRoute()

axios.get("/go1-api/anime/jbtxbfgw").then(async res=>{
    // console.log(res.data[0])
    JBTXFanName.value = await res.data[0].name
    JBTXFanImage.value = await res.data[0].anime_image
    JBTXVideoUrl.value = await res.data[0].anime_msg[route.params.fan - 1].fan_player
    fan1Url.value = await res.data[0].anime_msg[0].fan_player
    fan2Url.value = await res.data[0].anime_msg[1].fan_player
}).catch(err=>console.log(err))

onMounted(()=>{
    document.title = "久保同学不放过我 - 番剧|EvenSO"
})

</script>

<template>
    <div class="jbtx1VideoAll">
        <div class="dialogBoxColor"></div>
        <div class="jbtxVideoMasterBox">
            <animeModel1 
                fan_fm=""
                :videoUrl="JBTXVideoUrl"

                :fan1Url="fan1Url"
                :fan2Url="fan2Url"
            />
        </div>
        <div>
            <animeModel2 
            :fan_name="JBTXFanName"
            :fan_fm="JBTXFanImage"
            fan_type="漫画改"
            fan_theme1="校园"
            fan_theme2="恋爱"
            fan_status="已完结, 全12话"
            fan_year="2023"
            fan_msg="jbtx"/>
        </div>
    </div>
</template>

<style scoped>
.jbtx1VideoAll{
    position: absolute;
    left: 0;
    top: 0;
    width: 1855px;
    height: 100%;
    /* background-color: red; */
    /* overflow: hidden; */
}
.dialogBoxColor{
    width: 100%;
    height: 6%;
    background: linear-gradient(to left,rgb(56,48,47),rgb(105,68,128));
}

.jbtxVideoMasterBox{
    width: 100%;
    height: 94%;
}
</style>